const webpack = require("webpack");
module.exports = {
  chainWebpack: (config) => {
    config.plugin("provide").use(webpack.ProvidePlugin, [
      {
        // other modules
        introJs: ["intro.js"],
      },
    ]);
  },
  lintOnSave: false,
  publicPath: "./",
  assetsDir: "static",
  productionSourceMap: false,
  devServer: {
    proxy: {
      "/api/CarOptimalSovler": {
        target: "http://api.yuanxulei.com", //对应自己的接口
        // target: 'http://1.119.155.116:8081/', //对应自己的接口
        changeOrigin: true,
      },
      "/api": {
        target: "http://10.0.13.2:8080/", //对应自己的接口
        // target: 'http://1.119.155.116:8081/', //对应自己的接口
        changeOrigin: true,
        ws: true,
        pathRewrite: {
          "^/api": "",
        },
      },
    },
  },
};
